package com.versita.domain;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity
public class UserDetail implements Serializable {
    /**
     * 
     */
    private static final long serialVersionUID = -1158266291459862140L;

    private long userDetailId;
    private String address;
    private String city;
    private String country;
    /**
     * @return the userDetailId
     */
    @Id @GeneratedValue(strategy=GenerationType.AUTO)
    public long getUserDetailId() {
        return userDetailId;
    }
    /**
     * @param userDetailId the userDetailId to set
     */
    public void setUserDetailId(long userDetailId) {
        this.userDetailId = userDetailId;
    }
    /**
     * @return the address
     */
    public String getAddress() {
        return this.address;
    }
    /**
     * @param address the address to set
     */
    public void setAddress(String address) {
        this.address = address;
    }
    /**
     * @return the city
     */
    public String getCity() {
        return this.city;
    }
    /**
     * @param city the city to set
     */
    public void setCity(String city) {
        this.city = city;
    }
    /**
     * @return the country
     */
    public String getCountry() {
        return this.country;
    }
    /**
     * @param country the country to set
     */
    public void setCountry(String country) {
        this.country = country;
    }
    /* (non-Javadoc)
     * @see java.lang.Object#hashCode()
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((this.address == null) ? 0 : this.address.hashCode());
        result = prime * result + ((this.city == null) ? 0 : this.city.hashCode());
        result = prime * result + ((this.country == null) ? 0 : this.country.hashCode());
        return result;
    }
    /* (non-Javadoc)
     * @see java.lang.Object#equals(java.lang.Object)
     */
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        UserDetail other = (UserDetail) obj;
        if (this.address == null) {
            if (other.address != null)
                return false;
        } else if (!this.address.equals(other.address))
            return false;
        if (this.city == null) {
            if (other.city != null)
                return false;
        } else if (!this.city.equals(other.city))
            return false;
        if (this.country == null) {
            if (other.country != null)
                return false;
        } else if (!this.country.equals(other.country))
            return false;
        return true;
    }
}
